
//
// 120824 - AH - Created.
// 121003 - AH - Changed name from TestTreeFactory and added
//               createWorlds(Map<String, Object>).
// 121111 - AH - getName().
// 121113a- AH - Replaced createWorlds(Map<String, Object>) with 
//               getWorldNames() and createWorld(String) to make it easy to
//               create new worlds when needed.
// 121113b- AH - create() renamed to createTests().
//

package org.japril.jhut.framework;

import java.util.List;

/**
 * <p>
 *   Interface for objects that creates a forest of
 *   {@link JhutTest}.
 * </p>
 * @param <W> World type.
 * @author Arne Halvorsen (AH)
 */
public interface TestFactory
{
  /**
   * <p>
   *   Gets name identifying what being tested.
   * </p>
   * @return Name.
   */
  String getName();
  
  /**
   * <p>
   *   Creates.
   * </p>
   * @return Roots of created trees.
   */
  List<JhutTest> createTests();
  
  /**
   * <p>
   *   Gets names on worlds to run test over.
   * </p>
   * @return Names.
   */
  List<String> getWorldNames();
  
  /**
   * <p>
   *   Creates named world.
   * </p>
   * @param name Name on world to create.
   * @return Created.
   */
  Object createWorld(String name);
  
  /**
   * <p>
   *   Creates 'world' objects to run test paths over.
   * </p>
   * @param worlds {@link Map} where 'world' objects are put as values and
   *               keys names the 'world' objects.
   */
  //void createWorlds(Map<String, Object> worlds);
  
}
